﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using zkemkeeper;
using ZKLibrarys.Models;

namespace ZKLibrarys.zkem
{
    /// <summary>
    /// 公共变量与常量
    /// </summary>
    public class ZKGConf
    {
        /// <summary>
        /// 所有考勤机配置对象
        /// </summary>
        public static List<ModelZKMachine> ZKMachines { get; set; } = new List<ModelZKMachine>();

        /// <summary>
        /// 获取指定机号的考勤机类
        /// </summary>
        /// <param name="ID">考勤机号</param>
        /// <returns></returns>
        public static CZKEMClass GetZKClass(int ID)
        {
            return ZKMachines.First(t => t.ID == ID).ZKMachineClass;
        }
    }
}
